package app;

import java.awt.Color;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;

public class EditarUsuarioDialog extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JPanel contentPaneEditUser;
	private JTextField nombreFieldEdit;
	private JTextField apPaternoFieldEdit;
	private JTextField apMaternoFieldEdit;
	private JTextField emailFieldEdit;
	private JTextField usuarioFieldEdit;

	public EditarUsuarioDialog() {
		setTitle("Editar Usuario");
		setIconImage(Toolkit.getDefaultToolkit().getImage(RegistroUsuarioDialog.class.getResource("/icons/emblem-personal.png")));
		setBounds(100, 100, 620, 230);
		contentPaneEditUser = new JPanel();
		contentPaneEditUser.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPaneEditUser);
		contentPaneEditUser.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setLayout(null);
		panel.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), "Editar", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(10, 11, 590, 177);
		contentPaneEditUser.add(panel);
		
		JLabel label = new JLabel("Nombre:");
		label.setBounds(310, 31, 57, 15);
		panel.add(label);
		
		JLabel label_1 = new JLabel("Apellido Paterno:");
		label_1.setBounds(310, 59, 95, 15);
		panel.add(label_1);
		
		JLabel label_2 = new JLabel("Apellido Materno:");
		label_2.setBounds(310, 87, 95, 15);
		panel.add(label_2);
		
		JLabel label_3 = new JLabel("E-Mail:");
		label_3.setBounds(52, 58, 46, 15);
		panel.add(label_3);
		
		nombreFieldEdit = new JTextField();
		nombreFieldEdit.setBackground(Color.WHITE);
		nombreFieldEdit.setColumns(10);
		nombreFieldEdit.setBounds(425, 28, 114, 20);
		panel.add(nombreFieldEdit);
		
		apPaternoFieldEdit = new JTextField();
		apPaternoFieldEdit.setColumns(10);
		apPaternoFieldEdit.setBounds(425, 57, 114, 20);
		panel.add(apPaternoFieldEdit);
		
		apMaternoFieldEdit = new JTextField();
		apMaternoFieldEdit.setColumns(10);
		apMaternoFieldEdit.setBounds(425, 84, 114, 20);
		panel.add(apMaternoFieldEdit);
		
		emailFieldEdit = new JTextField();
		emailFieldEdit.setColumns(10);
		emailFieldEdit.setBounds(125, 52, 129, 20);
		panel.add(emailFieldEdit);
		
		JLabel label_6 = new JLabel("Usuario:");
		label_6.setBounds(52, 27, 46, 15);
		panel.add(label_6);
		
		usuarioFieldEdit = new JTextField();
		usuarioFieldEdit.setEditable(false);
		usuarioFieldEdit.setColumns(10);
		usuarioFieldEdit.setBounds(124, 27, 130, 20);
		panel.add(usuarioFieldEdit);
		
		JLabel label_7 = new JLabel("Sexo:");
		label_7.setBounds(52, 86, 46, 15);
		panel.add(label_7);
		
		JComboBox<String> sexoField = new JComboBox<String>();
		sexoField.setModel(new DefaultComboBoxModel<String>(new String[] {"H", "M"}));
		sexoField.setBounds(125, 82, 129, 22);
		panel.add(sexoField);
		
		JLabel label_8 = new JLabel("");
		label_8.setIcon(new ImageIcon(RegistroUsuarioDialog.class.getResource("/icons/format-text-direction-rtl.png")));
		label_8.setBounds(10, 15, 32, 89);
		panel.add(label_8);
		
		JButton registerButton = new JButton("Editar");
		registerButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		registerButton.setIcon(new ImageIcon(RegistroUsuarioDialog.class.getResource("/icons/dialog-ok.png")));
		registerButton.setBounds(459, 126, 114, 35);
		panel.add(registerButton);
		
		JLabel msgNombre = new JLabel("");
		msgNombre.setIcon(null);
		msgNombre.setBounds(549, 30, 16, 16);
		panel.add(msgNombre);
		
		JLabel msg_ApPaterno = new JLabel("");
		msg_ApPaterno.setBounds(549, 58, 16, 16);
		panel.add(msg_ApPaterno);
		
		JLabel msg_ApMaterno = new JLabel("");
		msg_ApMaterno.setBounds(549, 86, 16, 16);
		panel.add(msg_ApMaterno);
		
		JLabel msg_Email = new JLabel("");
		msg_Email.setBounds(264, 52, 16, 16);
		panel.add(msg_Email);
		
		JButton button = new JButton("Cancelar");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				setVisible(false);
			}
		});
		button.setIcon(new ImageIcon(RegistroUsuarioDialog.class.getResource("/icons/window-close.png")));
		button.setBounds(339, 126, 110, 35);
		panel.add(button);
	}
}
